<template>
  <div class="home">
    <div class="inner">
      <div class="content">
        <div class="top">
          <img :src="itemData.image.url" alt="" />
        </div>
        <div class="bottom">
          <div class="comment">
            <div class="summaryText">{{ itemData.summaryText }}</div>
            <div class="rating">{{ itemData.commenScore }}</div>
            <div class="houseName">
              {{ itemData.houseName }}
            </div>
          </div>
          <div class="price">
            <van-rate :readonly="true" :allow-half="true" :modelValue="itemData.commentScore" icon="star" color="#fff" size="12"/>
            <div class="newPrice">￥{{ itemData.finalPrice }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  itemData: {
    type: Object,
    default: {},
  },
});
</script>

<style lang="less" scoped>
.inner {
    width:50%;
    height: 220px;
    padding: 10px;
    box-sizing: border-box;
  .content {
    width: 150px;
    height: 200px;
    img {
      width: 150px;
      height: 200px;
      border-radius: 5px;
    }

    .bottom {
      font-size: 14px;
      
      color: #f1f1f1;
      font-weight: 400;
      .comment {
        position: relative;
        bottom: 100px;
        left: 8px;
        width: 140px;
        height: 30px;
       
        .houseName
        {
             margin-top: 10px; 
             overflow: hidden;
             text-overflow: ellipsis;
             display: -webkit-box;
             -webkit-line-clamp: 2;
             -webkit-box-orient: vertical;
        }

      }

      .price
      {
        position: relative;
        bottom: 65px;
        // left: 8px;
        display: flex;
        justify-content: space-around;
      }

     
    }
  }
}
</style>